<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>05-个人中心-已登录-01设置-04身份证号码</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="screen-orientation" content="portrait">
    <meta name="x5-orientation" content="portrait">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="Expires" content="-1">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Pragma" content="no-cache">
    <link href="css/public.css" rel="stylesheet" type="text/css" media="all" />
    <link href="css/personal.css" rel="stylesheet" type="text/css" media="all" />
    <script src="js/jquery-2.1.4.min.js"></script>
</head>
<body class="graybody">
<header class="header">
    <div class="header_right"><a href="#" class="fontcolor save_idCard">保存</a></div>
    <div class="header_left"><a href="#" class="returnico"></a></div>
    <div class="header_center fontcolor">身份证号码</div>
</header>
<div class="changename">
    <input type="tel" class="changenameinput" id="idCard" placeholder="请输入您的身份证号码">
</div>
<script type="text/javascript">
$(function(){
	//身份证号码格式验证
	function chkIdCard(){
		var idCard=document.getElementById("idCard").value;
		var patternIdCard=/(^\d{15}$)|(^\d{17}([0-9]|X|x)$)/;
		if(patternIdCard.test(idCard)){
			
		}else{
			alert("您输入的身份证格式有误！")
			return false;
		}
	}
	$(".save_idCard").click(function(){
		chkIdCard();
	})
	
})
</script>
</body>
</html>